package com.comum.javahomework420242025.repository;

import com.comum.javahomework420242025.pojo.Chance;
import com.comum.javahomework420242025.pojo.Trace;
import com.comum.javahomework420242025.pojo.Traceuser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface TraceUserRepository extends JpaRepository<Traceuser, Long> {

    @Query("SELECT c.chance FROM Traceuser c WHERE " +
            "c.userid = :str")
    List<Chance> getAllChanceByUserId(@Param("str") String str);
}
